package com.peoit.honeycomb.dto;

import com.peoit.honeycomb.domain.FinanceReport;
import com.peoit.honeycomb.domain.HoneycombProject;

public class FinanceReportDto extends BaseDto {
	private String projectId; // 项目ID
	private String date; // 报表时间
	private String remarks;// 备注
	private Double income;// 收入
	private Double expense;// 支出
	private HoneycombProject project;

	public static FinanceReport toEntity(FinanceReportDto dto) {
		FinanceReport report = new FinanceReport();
		report.setReportDate(dto.getDate());
		report.setRemarks(dto.getRemarks());
		report.setIncome(dto.getIncome());
		report.setExpense(dto.getExpense());
		report.setProject(dto.getProject());
		return report;
	}

	public static FinanceReportDto toDto(FinanceReport financeReport) {
		FinanceReportDto financeReportDto = new FinanceReportDto();
		financeReportDto.setDate(financeReport.getReportDate());
		financeReportDto.setRemarks(financeReport.getRemarks());
		financeReportDto.setIncome(financeReport.getIncome());
		financeReportDto.setExpense(financeReport.getExpense());
		return financeReportDto;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Double getIncome() {
		return income;
	}

	public void setIncome(Double income) {
		this.income = income;
	}

	public Double getExpense() {
		return expense;
	}

	public void setExpense(Double expense) {
		this.expense = expense;
	}

	public HoneycombProject getProject() {
		return project;
	}

	public void setProject(HoneycombProject project) {
		this.project = project;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

}
